package com.example.vehicle;

import com.example.vehicle.Entity.Key;
import com.example.vehicle.Entity.VehicleUser;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.IOException;

/**
 * @name: HelloApplication
 * @description: 客户端启动类。
 * @author: Lulu Zhao
 **/
public class HelloApplication extends Application {

    public static Stage stage;

    public static VehicleUser loginUser = new VehicleUser();

    public static Key key = new Key();

    /**
     * @name: start
     * @description: 界面启动方法。
     * @params: [stage]
     * @return: void
     * @author: Lulu Zhao
     */
    @Override
    public void start(Stage stage) throws IOException {
        HelloApplication.stage = stage;
        FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
        Scene scene = new Scene(fxmlLoader.load());
        stage.setResizable(false);
        stage.setTitle("基于区块链的车联网数据共享平台客户端");
        stage.setScene(scene);
        stage.show();
    }

    /**
     * @name: main
     * @description: 客户端程序入口函数。
     * @params: [args]
     * @return: void
     * @author: Lulu Zhao
     */
    public static void main(String[] args) {
        launch();
    }
}
